<?php
/**
 * Fang_Controller_About
 * 关于页面，用intro表中的字段i_about_ids记录文章ID
 * 
 * 作者:  姚刚 (yaogang@the9sense.com)
 * 创建时间: 2011-03-22 06:15:04
 * 修改记录: 
 * 
 * $Id: About.php 18 2011-04-17 12:50:07Z coosuu $
 */

class Fang_Controller_About extends Fang_Controller_Base {

    /**
     * indexAction 
     * 
     * @return void
     */
    public function indexAction() {

        $intro = $this->intro;
        if (!$intro['i_about_ids']) {
            return $this->errorMessage('暂时没有相关内容');
        }

        $aboutIds = $intro['i_about_ids'];
        try {
            $articleService =& Service::factory('Article');
            $articles = $articleService->listByCid($aboutIds);
        } catch (Exception $e) {
           return $this->errorMessage($e->getMessage());
        }

        $this->view->set('articles', $articles);
        return $this->view->render('about');
    }
}
